package com.byedu.domain.course;

import java.io.Serializable;

/**
 * Created by Luo on 2017-04-25.
 */
public class UserDO implements Serializable{
	
	private static final long serialVersionUID = -541245526877682594L;
	
	/*用户编号*/
    private String id;
    /*用户名*/
    private String username;
    /*密码*/
    private String password;
    /*昵称*/
    private String nickname;
    /*头像*/
    private String avatar;

    public UserDO () {}
    
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UserDO userDO = (UserDO) o;

        if (id != null ? !id.equals(userDO.id) : userDO.id != null) return false;
        if (username != null ? !username.equals(userDO.username) : userDO.username != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (username != null ? username.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "UserDO{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", nickname='" + nickname + '\'' +
                ", avatar='" + avatar + '\'' +
                '}';
    }
}
